<?php
/**
 * MyController.php
 * 文件描述
 * Created on 2019/12/16 16:11
 * Create by Wpeishi
 */

namespace App\Http\Controllers;


use App\Jobs\Queue;

class MyController extends Controller
{
    //
    public function test(){

//        return 123123;
//        执行命令进行消费
        # php artisan queue:work rabbitmq
        $this->dispatch(new Queue([1,2,5,4,5,66,31,2]));
        return response()->json(['code'=>0, 'msg'=>"success"]);

    }
    // shengc
    public function index()
    {
        $this->dispatch(new Queue([1,2,5,4,5,66,3]));

        return response()->json(['code'=>0, 'msg'=>"success"]);
    }
}
